fix(hub): externalize remote-docker + digitalocean sandbox backends - #299
Closed
positonic wants to merge 1 commit into
Closed
fix(hub): externalize remote-docker + digitalocean sandbox backends#299positonic wants to merge 1 commit into
positonic wants to merge 1 commit into
Conversation
The hub's provider IMPORTERS map (apps/hub/lib/hub-backend.ts) dynamic-imports
every @agentbox/sandbox-* backend, but serverExternalPackages in next.config.mjs
listed only docker/daytona/hetzner/vercel/e2b. sandbox-remote-docker and
sandbox-digitalocean were omitted, so on a published (npm-installed) hub their
dynamic import has nothing to resolve at runtime:
host executor failed: Cannot find package '@agentbox/sandbox-remote-docker'
imported from .../runtime/hub/apps/hub/chunk-*.js
Effect: every host-relay git op (git push / pr, even read-only) fails for
remote-docker boxes, so branches can't leave the box normally. Same failure
class as madarco#270 (cloud backends), which fixed the CLI/relay path but not the
hub's externalization list.
Add both missing backends to serverExternalPackages so they are externalized
and traced into the standalone build exactly like the other five providers.
Fixes madarco#298
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thanks for your pull request. Before it can be merged, please read our Contributor License Agreement and sign it by posting the comment below. You only ever have to do this once. I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Owner
|
@positonic thanks this looks a fix needed, should we reopen? |
Owner
|
nvm this fix wasn't enough, I've released a patch on v0.27.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a published (
npm i -g @madarco/agentbox) install, any host-relay git op from a remote-docker box fails:This blocks
git push/gh pr(and even read-onlypr list) for remote-docker boxes, so a finished branch can't leave the box through the normal path. Fixes #298.Root cause
The hub's provider map dynamic-imports every backend (
apps/hub/lib/hub-backend.ts):But
serverExternalPackagesinapps/hub/next.config.mjslisted onlydocker/daytona/hetzner/vercel/e2b—remote-dockeranddigitaloceanwere omitted. Those two are the only providers not externalized, so on a published hub their dynamic import resolves to nothing at runtime, while the other five resolve fine.This is the same failure class as #270 (
fix(relay): inject cloud backends instead of resolving them from node_modules), which covered the CLI/relay path but not the hub's externalization list.Fix
Add the two missing backends to
serverExternalPackagesso they're externalized and traced into the standalone build exactly like the other five:Both are already declared deps of
apps/huband present in theIMPORTERSmap — only the externalization entry was missing.Validation
node --check apps/hub/next.config.mjspasses.@madarco/agentbox0.27.1 and0.28.0-nightly(both ship nosandbox-remote-docker).Suggested follow-up (not in this PR)
A small guard asserting
keys(IMPORTERS) ⊆ serverExternalPackageswould prevent this exact omission from recurring when a new provider is added. Happy to add it if you'd like, butapps/hubhas no test harness today so I kept this PR to the one-line fix.